<?php
/*
 Plugin Name: Hieu Plugin
 Plugin URI: http:weshop.com
 Description: Plugin made by Hieus
 Author: Hieu
 Version: 1.0
 Author URI: http://hieupro.com
 */
	register_activation_hook(__FILE__, 'hello_world_install');
	register_deactivation_hook(__FILE__, 'hello_world_remove');
	function hello_world_install(){
		add_option('hello_world_data','Default','','yes');
	}
	function hello_world_remove(){
		delete_option('hello_world_data');
	}
//add_action('init', 'helloWord');
//if (is_admin()){
//	/** Step 2 (from text above). */
//	add_action( 'admin_menu', 'hello_world_admin_menu' );
//
//	/** Step 1. */
//	function hello_world_admin_menu() {
//		add_options_page( 'Hello Word plugin', 'Hieu Plugin', 'manage_options', 'my-unique-identifier', 'hello_world_html_page' );
//	}

	/** Step 3. */

	function hello_world_html_page() {
		?>
<div>
<h2>Hello World Options</h2>

<form method="post" action="options.php"><?php wp_nonce_field('update-options'); ?>

<table width="510">
	<tr valign="top">
		<th width="92" scope="row">Enter Text</th>
		<td width="406"><input name="hello_world_data" type="text"
			id="hello_world_data"
			value="<?php echo get_option('hello_world_data'); ?>" /> (ex. Hello
		World)</td>
	</tr>
</table>

<input type="hidden" name="action" value="update" /> <input
	type="hidden" name="page_options" value="hello_world_data" />

<p><input type="submit" value="<?php _e('Save Changes') ?>" /></p>

</form>
</div>
		<?php
	}
	?>
	<?php
//}
function helloWord(){
	echo 'Hello word !';
}

?>